package com.framework.Module.jxc.jxccrku;

import com.framework.Table.Table;
import com.framerock.baselib.Rock;


public class Tablejxccrku extends Table {

  

    protected void initTable() {
        this.tablename   = "jxcgoodm";
        this.tablenamesm = "商品出入库";

        this.flowsetMap  = Rock.getMap(new String[]{
                "type", "进销存",
                "sort", "53",
                "isxt", "2",
                "num", "jxccrku",
                "summary", "{applydt}",
                "imgurl","https://xinhu-1251238447.file.myqcloud.com/img/crku.png",
                "istj","1",
                "where","`btype`=0"
        });
        this.addfields("applydt", "date", null, "申请日期", new String[]{
                "isbt","1",
                "devval","{date}"
        });
        this.addfields("type", "tinyint(1)", "0", "类型@0|入库,1|出库", new String[]{
                "isbt","1",
                "islu","0",
                "fieldstype","select"
        });
        this.addfields("kind", "tinyint(2)", "0", "出入库类型@kinddata", new String[]{
                "isbt","1",
                "fieldstype","select"
        });
        this.addfields("ckid", "int(11)", "0", "指定仓库@ckiddata", new String[]{
                "fieldstype","select"
        });
        this.addfields("custname", "varchar(100)", "", "相关客户@custdata,custid", new String[]{
                "isbt","0",
                "isss","1",
                "fieldstype","selectdatafalse"
        });
        this.addfields("custid", "int(11)", "0", "客户ID", new String[]{
                "islu","0",
                "islb","0",
        });
        this.addfields("goodslist", "varchar(500)", "", "商品列表@jxcgoodn,mid", new String[]{
                "isalign","1",
                "islb","1",
                "isbt","1",
                "fieldstype","subdata"
        });
        this.addfields("cid", "int(11)", "0", "对应单位", new String[]{
                "islu","0",
                "notelement","1"
        });
        this.addfields("explain", "varchar(500)", "", "说明", new String[]{
                "isalign","1",
                "islb","0",
                "fieldstype","textarea"
        });
        this.addfields("money", "decimal(12,2)", "0.00", "费用", new String[]{
                "islb","1",
                "gongshi","[{goodslist.count}*{goodslist.price}]-{discount}",
                "attr","readonly"
        });
        this.addfields("discount", "decimal(10,2)", "0.00", "优惠金额", new String[]{
                "islb","0",
                "fieldstype","number"
        });
        this.addfields("aid", "int(11)", "0", "操作人ID", new String[]{
                "islu","0",
                "islb","0",
                "notelement","1"
        });
        this.addfields("optname", "varchar(50)", "", "操作人", new String[]{
                "islu","0",
        });
        this.addfields("state", "tinyint(1)", "0", "出入库状态@jxcbase:churukustate", new String[]{
                "islu","0",
                "fieldstype","select"
        });
        this.addfields("inoutname", "varchar(50)", "", "操作出入库人", new String[]{
                "islu","0",
                "islb","0",
        });
        this.addfields("inoutid", "int(11)", "0", "操作出入库人ID", new String[]{
                "islu","0",
                "notelement","1"
        });
        this.addfields("inouttime", "datetime", null, "出入库时间", new String[]{
                "islu","0",
                "islb","0"
        });
        this.addfields("btype", "tinyint(1)", "0", "类型", new String[]{
                "islu","0",
                "islb","0",
                "notelement","1"
        });
        this.addfields("cid", "KEY", "`cid`", "单位ID");

        this.addFlowMenu("crku",new String[]{
                "name","去出入库操作",
                "type","7",
                "where","`state`=0",
                "upcont", "",
                "statuscolor","red"
        });
    }

}
